<template>
  <div class="gitee-container">
  </div>
</template>

<script>
export default {
  //组件名称
  name: "Gitee",
  props: [],
  //组件注册
  components: {},
  //数据驱动
  data() {
    return {}
  },
  //计算属性
  computed: {},
  //数据监听
  watch: {},
  //方法
  methods: {},
  //钩子函数
  mounted() {
    let path = this.$route.path;
    let query = this.$route.query;
    if (path.indexOf("gitee") != -1) {
      let code = query.code;
      let state = query.state;
      this.axios.get(`/login-web/gitee/info`, {
        params: {
          code: code,
          state: state,
        }
      })
      .then((data) => {
        if(data.code==200){
          //todo 登录成功
          this.$router.push("/")
        }
      })

    }
  }
}
</script>

<style lang="less" scoped>

</style>